package datas.datasInterior
{
	
	import datas.MessageSWF;
	
	import events.LoadedSWF;
	
	import flash.display.LoaderInfo;
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.system.ApplicationDomain;
	
	import interfaces.ILoader;
	
	import uilts.LoadSWF;
	
	public class MessSWF extends MovieClip implements ILoader
	{
		private var value:FixedRoute = FixedRoute.getInstance();
		private var urlSWF:String;
		public var resource:MovieClip;
		private var mess:MessageSWF = MessageSWF.getInstace();
		public function MessSWF(pass:String)
		{
			switch(pass){
				case "one":
					urlSWF = value.LEVEL_1_SWF;
					break;
				case "two":
					urlSWF = value.LEVEL_2_SWF;
					break;
				case "three":
					urlSWF = value.LEVEL_3_SWF;
					break;
				case "four":
					urlSWF = value.LEVEL_4_SWF;
					break;
				case "five":
					urlSWF = value.LEVEL_5_SWF;
					break;
				case "six":
					urlSWF = value.LEVEL_6_SWF;
					break;
				case "seven":
					urlSWF = value.LEVEL_7_SWF;
					break;
				case "eight":
					urlSWF = value.LEVEL_8_SWF;
					break;
				case "nine":
					urlSWF = value.LEVEL_9_SWF;
					break;
				case "ten":
					urlSWF = value.LEVEL_10_SWF;
					break;
				case "eleven":
					urlSWF = value.LEVEL_11_SWF;
					break;
				case "twelve":
					urlSWF = value.LEVEL_12_SWF;
					break;
			}
			if(pass == null)trace("MessagesSWF 发生未载入路径");
			else var loadSWF:LoadSWF = new LoadSWF(this,urlSWF);
		}
			
		public function onComplete(event:Event):void
		{
			mess.element = event.target as LoaderInfo;
			dispatchEvent(new LoadedSWF(LoadedSWF.LOADEDSWF));
		}
	}
}